home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / fnorddel / fn132man.zoo / chapter.06 < prev    next >
Text File  |  1991-09-02  |  15KB  |  397 lines

  1.  
  2.  
  3. Chapter 6:  Modem Stuff                                                   86
  4.  
  5.  
  6.  
  7.  
  8. 6  Modem Stuff
  9.  
  10.  
  11.    Modems  are finicky  beasts,  and  cajoling  them into  talking  to  your
  12. Fnordadel properly can be  a tricky piece of business.  This  chapter, then,
  13. deals with the  various modem configuration options in Fnordadel,  and gives
  14. some tips on how to make a recalcitrant modem behave.
  15.  
  16.  
  17.  
  18. 6.1  Basic Modem Requirements
  19.  
  20.    To run a Fnordadel, you  must have a modem possessing a modicum  of basic
  21. features.  These are:
  22.  
  23.   o Must be able to auto-answer the phone.
  24.  
  25.   o Must be  able to respond  to DTR (Data  Terminal Ready) line control  by
  26.     the computer.   DTR is  supposed to be pin  20 on the RS-232  connector.
  27.     Ideally, the  modem should be  able to hang up  the phone, disable  auto
  28.     answer, and  go to `command' mode when  the computer flips DTR  off (and
  29.     reverse the above when DTR goes high).
  30.  
  31.   o Must  have the  CD  (Carrier Detect)  line tracking  the  status of  the
  32.     carrier.  CD (or DCD) is supposed to be pin 8 on the RS-232 connector.
  33.  
  34.   o If  you  want  to  do  any  calling  out  (i.e.,  during  networking  or
  35.     whatever), the modem must be able to autodial  the phone using a command
  36.     string.
  37.  
  38.    Most modems are perfectly capable of all of the above.   If your modem is
  39. advertised as being ``Hayes-compatible'',  then it *should* work fine.   The
  40. DTR and CD  settings will likely have to  be adjusted, since most  modems do
  41. not by default listen to  DTR and most leave the CD line high all  the time.
  42. These behaviours  can be  changed either  by using  a DIP-switch  or in  the
  43. software; it's almost always possible.
  44.  
  45.    STadel 3.3b, from  which Fnordadel is  descended, was advertised to  work
  46. with the  following list of  modems, and there's no  reason to believe  that
  47. we've introduced any incompatibilities:
  48.  
  49.   o Avatex 1200, 1200E, 1200HC, 2400HC
  50.  
  51.   o Everex 2400
  52.  
  53.   o FastComm 19200
  54.  
  55.   o Hayes 1200, 2400
  56.  
  57.   o Incomm 2400
  58.  
  59.   o MultiTech 1200, 2400
  60.  
  61.   o Prometheus 2400B2
  62.  
  63.   o Supra 2400
  64.  
  65.  
  66.  
  67. Chapter 6:  Modem Stuff                                                   87
  68.  
  69.  
  70.  
  71.  
  72.   o Telebit Trailblazer 19,200
  73.  
  74.   o USR Courier 2400, HST 9600
  75.  
  76. The Fnordadel  developers both  use the Supra  2400; we've  been running  24
  77. hours a  day for  a few  years now  and have had  no problems  with the  wee
  78. beasties.  Your mileage may vary, of course.
  79.  
  80.  
  81.  
  82. 6.2  Setting Up the Modem
  83.  
  84.    If your modem meets the above criteria, then we're off.   (If it doesn't,
  85. then  go buy  a real  modem---1200  and 2400  baud Hayes  compatible  modems
  86. are dirt  cheap these days.)   In  this section we'll  describe some of  the
  87. `ctdlcnfg.sys' options for the modem.
  88.  
  89.  
  90. 6.2.1  Baud rate
  91.  
  92.    You  must tell  Fnordadel  the  highest  baud rate  at  which  the  modem
  93. will function;  this  is accomplished by  setting the  variable #sysbaud  in
  94. `ctdlcnfg.sys'.  #sysbaud can have any one of the following values:
  95.  
  96. 0          300 bps only
  97.  
  98. 1          300 and 1200 bps
  99.  
  100. 2          300, 1200 and 2400 bps
  101.  
  102. 3          300, 1200, 2400 and 9600 bps
  103.  
  104. 4          300 up to 19200 bps
  105.  
  106.    Note that 4800 bps  is not supported.   The ST serial port will  do 4800,
  107. but we've never heard of  a modem that will, other than ones that  will also
  108. go faster.  If  for some reason you find yourself in dire need of  4800, see
  109. Appendix A [Fnordadel Support], page 170.
  110.  
  111.  
  112. 6.2.2  Initialisation
  113.  
  114.    Hayes  compatible modems,  at  least, understand  a  set of  commands  to
  115. control their behaviour.   Fnordadel requires that the modem be set up  in a
  116. certain way; thus,  you must define a  command string which will be  sent to
  117. the modem every time Fnordadel wants to reset the modem.   Simply put a line
  118. like the following:
  119.  
  120.       #modemsetup "AT &C1 &D2 V0 E0 M0 Q0 X4 S0=1\r%10"
  121.  
  122. in  your   `ctdlcnfg.sys'.      The   example  above  will   work  on   many
  123. Hayes-compatible modems.  The various parts mean:
  124.  
  125.   o The initial `AT' tells the modem that a command string is coming.
  126.  
  127.  
  128.  
  129. Chapter 6:  Modem Stuff                                                   88
  130.  
  131.  
  132.  
  133.  
  134.   o `&C1  &D2' sets  up the  required behaviour  for  the CD  and DTR  lines
  135.     (see Section  6.1 [Basic Modem Requirements], page  86).  If  your modem
  136.     controls  CD  and DTR  with  hardware  switches, it  probably  will  not
  137.     support these commands, so you may have to remove them.
  138.  
  139.   o `V0 E0 M0 Q0' selects numeric result  codes (see Section 6.2.3.2 [Result
  140.     codes],  page 89),  turns off command  echoing, turns  off the  built-in
  141.     speaker, and turns on result codes.
  142.  
  143.   o `X4'  tells the  modem to return  the full  range of  result codes  (see
  144.     Section 6.2.3.2 [Result codes], page 89).
  145.  
  146.   o `S0=1' tells the modem to answer the phone on the first ring.
  147.  
  148.   o `\r' represents a carriage return, which must  be there to terminate the
  149.     command string.
  150.  
  151.   o And  finally, `%10'  is a  special  notation which  causes Fnordadel  to
  152.     pause for 10 tenths  of a second (i.e., one second).  This  is necessary
  153.     for some  modems, which take  a comparatively long  time to process  the
  154.     command  string.   (See  the front  of  `ctdlcnfg.doc' for  more on  the
  155.     format of these sorts of string variables.)
  156.  
  157.    Please be warned  that your modem  may not recognise  some or all of  the
  158. above codes;  they may  be different, or  absent, or whatever.   We've  seen
  159. some pretty mental modem behaviour, so be sure to read your modem manual.
  160.  
  161.    A trick which has proved  useful with many modems is as follows:   If the
  162. modem allows  you to  save its settings  in non-volatile RAM  (i.e., if  the
  163. settings can  be preserved  when the  modem is  powered off),  then you  can
  164. use a  terminal program of some  kind to manually set  up the modem the  way
  165. Fnordadel wants  it, by  sending your  version of the  above command  string
  166. to the  modem.   Then use the  command to save  settings (usually `AT&W'  or
  167. something).  At this point you can simply use  `ATZ\r%10' as the #modemsetup
  168. string;  `ATZ' has the  effect of resetting  the modem  to the saved  state.
  169. The advantage of this is that the string is shorter,  so it can speed things
  170. up a  bit, especially during  networking or auto-dialing  when the modem  is
  171. being reset many times.
  172.  
  173.  
  174. 6.2.3  Baud-rate detection
  175.  
  176.    Fnordadel must be  able to detect  the baud rate  of incoming calls,  and
  177. it has a  couple of ways to  accomplish this.   The first is by  searchbaud,
  178. and the second  is using result codes.   Result codes are by far  the better
  179. method, and since most modems can support the feature, we recommend it.
  180.  
  181.  
  182.  
  183. Chapter 6:  Modem Stuff                                                   89
  184.  
  185.  
  186.  
  187.  
  188. 6.2.3.1  Searchbaud
  189.  
  190.    If you  define  the `ctdlcnfg.sys'  variable #searchbaud  to be  `1',  it
  191. will  cause Fnordadel  to loop  through the  range of  supported baud  rates
  192. (as defined by  #sysbaud; see Section 6.2.1  [Baud rate], page 87),  waiting
  193. one-half  second at  each  rate  for a  carriage  return (`<CR>')  from  the
  194. caller.   The upshot of this is that  callers must hit `<CR>' once  or twice
  195. when they connect with the BBS.
  196.  
  197.    If #searchbaud  is `0',  then your BBS  will work  at *only* the  highest
  198. baud  rate represented  by  #sysbaud.    This is  last-resort  stuff,  kids.
  199. You  should normally  run with  #searchbaud  set to  `1' unless  your  modem
  200. absolutely  fails to  properly detect  other speed  connections.   (If  your
  201. modem is this stupid, it might be time to consider getting another one.)
  202.  
  203.    The  variable  #connectprompt  modifies  the  behaviour   of  #searchbaud
  204. slightly;  if defined to  be `1', it  causes Fnordadel  to loop through  the
  205. baud rates,  spitting out a  prompt which says  ``Type return'' and  waiting
  206. for a `<CR>'  for a while;  it does all this  until the user hits `<CR>'  at
  207. some baud rate, or until it gives up.
  208.  
  209.    Anyway, this is  all pretty ugly, really; a  far better method is  to use
  210. result codes.
  211.  
  212.  
  213. 6.2.3.2  Result codes
  214.  
  215.    Most modems,  Hayes-compatible ones  included, will  send a  code to  the
  216. computer when  they pick  up a  carrier;  furthermore, they  can usually  be
  217. configured  to  return a  different  code  depending  on the  speed  of  the
  218. connection.  We utilise this to our advantage.
  219.  
  220.